package org.opensource.extfaces.sample;

import java.util.Date;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class Person {
	private String name;
	private Date birthday;
	private int age;
	private static Log log = LogFactory.getLog(Person.class);
	public Person() {
		
		super();
		this.name="test";
		this.age=20;
	}
	/**
	 * 
	 */
	private String gender;
	/**
	 * 
	 */
	private Date brithday;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	/**
	 * @return the gender
	 */
	public String getGender() {
		return gender;
	}
	/**
	 * @param gender the gender to set
	 */
	public void setGender(String gender) {
		this.gender = gender;
	}
	/**
	 * @return the brithday
	 */
	public Date getBrithday() {
		return brithday;
	}
	/**
	 * @param brithday the brithday to set
	 */
	public void setBrithday(Date brithday) {
		this.brithday = brithday;
	}
	public void savePerson(){
		log.info("name:"+this.name);
		log.info("age:"+this.age);
		log.info("birthday:"+this.birthday);
		log.info("gender:"+this.gender);
		//do persistence staff
		//sleep to show the mask bar
		try {
			Thread.currentThread().sleep(2000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
